<?php

namespace ApiBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

class DefaultController extends Controller
{
    /**
     * @Route(path="/suggest",name="api_suggest")
     *
     * @param Request $request
     */
    public function suggestAction(Request $request)
    {
        return new Response('ok suggest.');
    }

    /**
     * @Route(path="/",name="api_default")
     */
    public function indexAction()
    {
        return $this->json(['code' => 0, 'time' => time(), 'msg' => 'ok']);

    }
}
